package com.example.membersteward.mapper;

import com.example.membersteward.entity.Menu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
* @author 26690
* @description 针对表【menu(菜单表)】的数据库操作Mapper
* @createDate 2025-04-08 22:52:37
* @Entity com.example.membersteward.entity.Menu
*/
@Mapper
public interface MenuMapper extends BaseMapper<Menu> {

    @MapKey("parent_menu_id")
    List<Map<String,Object>>  selectByUserId(Long userId);

    @MapKey("parent_menu_id")
    List<Map<String,Object>> selectAllMenu();

    int deleteByMenuId(Long menuId);

    int insertMenu(Menu menu);

    int updateMenu(Menu menu);

    Menu selectByMenuId(Long menuId);
}




